﻿Imports Microsoft.Win32

Module Program

    Public Sub Main(ByVal args() As String)
        With My.Application.Log.DefaultFileLogWriter
            .Append = True
            .AutoFlush = True
            .Delimiter = ";"
            .IncludeHostName = True
            .Location = Logging.LogFileLocation.Custom
            .CustomLocation = FileHandler.SETTINGSPATH
            .TraceOutputOptions = TraceOptions.Timestamp
            .LogFileCreationSchedule = Logging.LogFileCreationScheduleOption.Daily
            .MaxFileSize = 100000
        End With

        Application.EnableVisualStyles()
        Application.DoEvents()
        If args Is Nothing Then
            Application.Run(New OptionsDialog)
        Else
            Dim dlgWork As New ProgressDialog()
            For Each arg As String In args
                If System.IO.Directory.Exists(arg) Then
                    dlgWork.ShowDialog(arg)
                End If
            Next arg
        End If
    End Sub

End Module
